/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package modele;

import java.util.Collection;
import java.util.HashSet;

/**
 *
 * @author sio
 */
public class Pays {

    private Collection<Dep> lesDeps = new HashSet<Dep>();
    private Collection<Spe> lesSpe = new HashSet<Spe>();

    public Pays() {
        lesDeps = DAO.getLesDeps();
        lesSpe = DAO.getLesSpe();
    }

    public Collection<Dep> getLesDeps() {
        return lesDeps;
    }

    public Dep getLeDep(String numDep) {
        for (Dep unDep : lesDeps) {
            if (numDep.equals(unDep.getNum())) {
                return unDep;
            }
        }
        return null;
    }
}
